
#ifndef __H_SYMPHONY_COMMANDS
#define __H_SYMPHONY_COMMANDS

#include <string>
#include "creature.h"

class CommandTable;



class Command {
  private:
    bool            _enabled;
    bool            _playerOnly;
    bool            _special;
    unsigned short  _level;
    std::string     _name;
    std::string     _shortcut;
    std::string     _syntax;
    CommandTable*   _commandTable;

  public:
    Command( void );
    virtual ~Command( void );

    void            enabled( const bool& enabled )                          { _enabled = enabled; }
    bool            enabled( void ) const                                   { return _enabled; }
    void            playerOnly( const bool& playerOnly )                    { _playerOnly = playerOnly; }
    bool            playerOnly( void ) const                                { return _playerOnly; }
    void            special( const bool& special )                          { _special = special; }
    bool            special( void ) const                                   { return _special; }
    void            level( const unsigned short& level )                    { _level = level; }
    unsigned short  level( void ) const                                     { return _level; }    
    void            name( const std::string& name )                         { _name = name; }
    std::string     name( void ) const                                      { return _name; }
    void            shortcut( const std::string& shortcut )                 { _shortcut = shortcut; }
    std::string     shortcut( void ) const                                  { return _shortcut; }
    void            syntax( const std::string& syntax )                     { _syntax = syntax; }
    std::string     syntax( void ) const                                    { return _syntax; }
    void            commandTable( CommandTable* commandTable )              { _commandTable = commandTable; }
    CommandTable*   commandTable( void )                                    { return _commandTable; }

    virtual bool    execute( Creature* creature, const std::string& args )  { return false; }
};

#define DEF_COMMAND(NAME)                                                 \
class NAME: public Command {                                              \
  public:                                                                 \
    NAME( void );                                                         \
    virtual ~NAME( void ) { }                                             \
                                                                          \
    virtual bool execute( Creature* creature, const std::string& args );  \
};                                                                        \



#endif // #ifndef __H_SYMPHONY_COMMANDS

